﻿using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using UnitLibrary;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using PhysicsObjects;
using UnitLibrary.ScreenSystem;
using Microsoft.Xna.Framework.Content;


namespace UnitLibrary.Managers
{
    public abstract class Manager
    {
        /// <summary>
        /// Manager ID
        /// </summary>
        protected int _managerID;

        /// <summary>
        /// Spritebatch just for this manager
        /// The draw will use the global spritebatch
        /// </summary>
        protected SpriteBatch _spriteBatch;

        /// <summary>
        /// SpriteFont to be used for temporary purposes
        /// </summary>
        protected SpriteFont _spriteFont;

        /// <summary>
        /// Class to build custom strings for use
        /// </summary>
        protected StringBuilder _stringBuilder;

        /// <summary>
        /// Dictionary to hold all the sprite fonts
        /// </summary>
        protected SpriteFonts _spriteFonts;

        /// <summary>
        /// 
        /// </summary>
        protected ComponentM _components;

        protected Game _game;

        /// <summary>
        /// Constructor for all managers
        /// </summary>
        /// <param name="game"></param>
        public Manager(Game game, ComponentM components)
        {
            //_spriteFonts = gameScreen.ScreenManager.SpriteFonts;
            _stringBuilder = new StringBuilder();
            _components = components;
            //could have just used gamescreen.screenmanager.spritebatch for everything, but what if i want to use this class in a game where there is no screen management?
            _spriteBatch = components.SpriteBatch;
            _spriteFonts = new SpriteFonts(components.ContentManager);
            _game = game;
        }
    }
}
